<!DOCTYPE html>
<html>
<head>
    <meta charset=utf-8>
    <title>测试页面</title>
    <script src="../static/js/jquery-1.12.4.js"></script>

    <script>
        $(function () {
            $("#testBotton").click(function () {
                goBack("前端的数据");
            })

            function goBack(id) {
                var domain_name = id;    //获取要传到后台的数据
                $.ajax({
                    type: "GET",
                // /cw_design/my_app/templates/main.html?_ijt=d6045r78rjovve567h1q98drco
                    url: "/cw_design/my_app/view",    //后台处理函数的url
                    data: domain_name,
                    success: function (result) {  //获取后台处理后传过来的result
                        alert(result)
                    },
                });
            }

        })
    </script>
</head>

<body>

<div>
    <!--<button type="button" id="testBotton">测试</button>-->
</div>

<!--<form method="post">-->
<!--{% csrf_token %}-->
    <!--<input type="text" value="{{ later_url }}" name="url" style="width: 500px; height: 40px;">-->
    <!--<input type="submit" name="search" value="搜索" style="width: 120px; height: 60px;">-->
        <!--<img src="{{ wordcloud }}">-->
        <!--<h1>{{summary}}</h1>-->
<!--</form>-->

<form action="" method="post">
    {% csrf_token %}
    <button type="button" id="testBotton">测试</button>
</form>


</body>
</html>